<script setup>
import { computed } from "vue";

const props = defineProps({
  color: {
    type: String,
    default: "#000",
  },
  title: {
    type: String,
    default: "",
  },
  bgStyle: {
    type: String,
    default: "#ffffff",
  },
  backShow: {
    type: Boolean,
    default: true,
  },
  scrollPageBefore: {
    type: String,
    default: "",
  },
  scrollNavBarBefore: {
    type: String,
    default: "",
  },
  opacity: {
    type: Number,
    default: 1,
  },
});
const pages = getCurrentPages();

const styleCompute = computed(() => {
  /**
   * @type {CSSStyleDeclaration}
   */
  let styles = {
    ...props.layoutStyle,
    background: props.bgStyle,
  };
  return styles;
});

function back() {
  if (pages.length === 1) {
    uni.switchTab({
      url: "/pages/home/index",
    });
    return;
  }
  uni.navigateBack();
}
</script>

<template>
  <view class="fixed z-[9999999] left-0 w-full">
  </view>
</template>

<style lang="scss" scoped></style>
